<template>
    <section class="main">
         <div class="title">
            <span>审核记录</span>
            <div>
                <el-button icon="el-icon-refresh"></el-button>
            </div>
        </div>
         <div class="container container1">

         </div>

        <div class="title">
            <span>基本信息</span>
            <div>
                <el-button icon="el-icon-refresh"></el-button>
            </div>
        </div>
        <div class="container container1">
            <div class="itemBox">
                <div class="line"><div>商户名</div><div>{{merchantinfo.merchantNo}}</div></div>
                <div class="line"><div>商户号</div><div>{{merchantinfo.merchantName}}</div></div>
                <div class="line"><div>商户简称</div><div>{{merchantinfo.merchantShortName}}</div></div>
                <div class="line"><div>注册名称</div><div>{{merchantinfo.merchantBusinessName}}</div></div>
                <div class="line"><div>商户地址</div><div>{{merchantinfo.merchantAddress}}</div></div>
                <div class="line" v-if="merchantinfo.businessLicence"><div>营业执照号</div><div>{{merchantinfo.businessLicence}}</div></div>
            </div>
            <div class="itemBox">
                <div class="line"><div>商户负责人</div><div>{{merchantinfo.accountCardName}}</div></div>
                <div class="line"><div>负责人电话</div><div>{{merchantinfo.contactPhone}}</div></div>
                <div class="line"><div>负责人邮箱</div><div>{{merchantinfo.contactEmail}}</div></div>
                <div class="line"><div>客服电话</div><div>{{merchantinfo.servicePhone}}</div></div>
                <div class="line"><div>入网商户类型</div>
                    <div v-if='merchantinfo.merchantType == 1'>企业</div>
                    <div v-if='merchantinfo.merchantType == 2'>个体工商户</div>
                    <div v-if='merchantinfo.merchantType == 3'>自然人商户</div>
                </div>
                <div class="line" v-if="merchantinfo.businessLicenceExpire"><div>执照有效期</div><div>{{merchantinfo.businessLicenceExpire}}</div></div>
                
                
            </div>
            <div class="itemBox">
                <div class="line"><div>一级服务商</div><div>{{merchantinfo.agent1Name}}</div></div>
                <div class="line"><div>二级服务商</div><div>{{merchantinfo.agent2Name}}</div></div>
                <div class="line"><div>业态</div><div>{{merchantinfo.bdName}}</div></div>
                <div class="line"><div>所属行业</div><div>{{merchantinfo.merchantMccName}}</div></div>
                <div class="line" v-if="merchantinfo.licenceType"><div>入网证件类型</div>
                    <div v-if="merchantinfo.licenceType == 0">营业执照</div>
                    <div v-if="merchantinfo.licenceType == 1">三证合一营业执照</div>
                </div>
            </div>
        </div>
        <!-- 结算信息 -->
        <div class="title">
            <span>结算信息</span>
            <div>
                <el-button icon="el-icon-refresh"></el-button>
            </div>
        </div>
        <div class="container container1">
            <div class="itemBox">
                <div class="line"><div>结算类型</div><div>{{merchantinfo.merchantTypeName}}</div></div>
                <div class="line"><div>开户名</div><div>{{merchantinfo.accountCardName}}</div></div>
                <div class="line"><div>开户支行</div><div>{{merchantinfo.accountBankName}}</div></div>
            </div>
            <div class="itemBox">
                <div class="line"><div>账户类型</div><div>{{merchantinfo.accountTypeName}}</div></div>
                <div class="line"><div>开户证件号</div><div>{{merchantinfo.principalCertNo}}</div></div>
                
                
            </div>
             <div class="itemBox">
                <div class="line"><div>银行预留手机号</div><div>{{merchantinfo.accountPhone}}</div></div>
                <div class="line"><div>开户账号</div><div>{{merchantinfo.accountCardNum}}</div></div>
            </div>
        </div>
         <!-- 附件 -->
        <div class="title">
            <span>附件</span>
            <div>
                <el-button icon="el-icon-refresh"></el-button>
            </div>
        </div>
        <div class="container container1">
            <div class="attachmentitem" v-if='uploadfile.pIdcardA'>
                <div><img  :src="uploadfile.pIdcardA" alt=""></div>
                <div>身份证正面</div>
            </div>
            <div class="attachmentitem" v-if='uploadfile.pIdcardB'>
                <div><img  :src="uploadfile.pIdcardB" alt=""></div>
                <div>身份证反面</div>
            </div>
            <div class="attachmentitem" v-if='uploadfile.pBankIdcardA'>
                <div><img  :src="uploadfile.pBankIdcardA" alt=""></div>
                <div>对私账户身份证正面照片</div>
            </div>
             <div class="attachmentitem" v-if='uploadfile.pBankIdcardB'>
                <div><img  :src="uploadfile.pBankIdcardB" alt=""></div>
                <div>对私账户身份证反面照片</div>
            </div>
            <div class="attachmentitem"  v-if='uploadfile.pBankcardA'>
                <div><img :src="uploadfile.pBankcardA" alt=""></div>
                <div>银行卡正面</div>
            </div>
            <div class="attachmentitem"  v-if='uploadfile.pBankcardB'>
                <div><img :src="uploadfile.pBankcardB" alt=""></div>
                <div>银行卡反面</div>
            </div>
            <div class="attachmentitem" v-if='uploadfile.pIdcardHander'>
                <div><img :src="uploadfile.pIdcardHander" alt=""></div>
                <div>手持身份证</div>
            </div>
            <div class="attachmentitem" v-if="uploadfile.pOutside">
                <div><img :src="uploadfile.pOutside" alt=""></div>
                <div>门头照</div>
            </div>
            <div class="attachmentitem" v-if="uploadfile.pInside">
                <div><img :src="uploadfile.pInside" alt=""></div>
                <div>内景照</div>
            </div>
            <div class="attachmentitem" v-if='uploadfile.pLicense'>
                <div><img :src="uploadfile.pLicense" alt=""></div>
                <div>营业执照</div>
            </div>
            <div class="attachmentitem" v-if='uploadfile.pOpenAccount'>
                <div><img :src="uploadfile.pOpenAccount" alt=""></div>
                <div>开户许可证照片</div>
            </div>
            <div class="attachmentitem" v-if='uploadfile.pOrganization'>
                <div><img :src="uploadfile.pOrganization" alt=""></div>
                <div>组织机构代码证照片</div>
            </div>
            <div class="attachmentitem" v-if='uploadfile.pTaxRegistration'>
                <div><img :src="uploadfile.pTaxRegistration" alt=""></div>
                <div>税务登记证照片</div>
            </div>
            <div class="attachmentitem" v-if='uploadfile.pUnincorporated'>
                <div><img :src="uploadfile.pUnincorporated" alt=""></div>
                <div>入账非法人证明照片</div>
            </div>
            <div class="attachmentitem" v-if='uploadfile.pUnincorporated'>
                <div><img :src="uploadfile.pUnincorporated" alt=""></div>
                <div>入账非法人证明照片</div>
            </div>
            <div class="attachmentitem" v-if='uploadfile.pOther'>
                <div><img :src="uploadfile.pOther" alt=""></div>
                <div>其他证明材料（选填）</div>
            </div>
        </div>
      

        <br />
        <br />
       
    </section>
</template>

<script>
import { merchantdetails, channel,uploadfileget,merchantreview } from "@/api/api";
export default {
    data(){
        return {
            disabled: true,
            merchantinfo: "",
            state:"1",
            note:"",
            uploadfile:"",
            visible: false,
            channertype: 1,
           
           
           
        }
    },
    created() {
        this.merchantinfo = JSON.parse(sessionStorage.getItem('auditinfo'))
        // console.log(this.merchantinfo)
        this.uploadfileget()
       
    },
     methods: {
         uploadfileget(){
            uploadfileget({},this.merchantinfo.uploadId).then(res => {
                console.log(res);
                if (res.code == 405) {
                    sessionStorage.removeItem("token");
                    this.$router.push("/login");
                    } else if (res.code == 200) {
                        this.uploadfile = res.data
                    }else{
                        this.$message.error(res.message);
                    }
                
            });
         },
       
     
    },
    watch: {
        
    }

}
</script>

<style scoped lang="less">
    .title{
        background: #fff;
        padding: 10px;
        font-size: 18px;
        font-weight: 500;
        display: flex;
        justify-content: space-between;
    }
    .container1{
        width: 100%;
        display: flex;
        margin-bottom: 20px;
        box-sizing: border-box;
    }
    .container1 .itemBox{
        width: 33%;
    }
    .container1 .itemBox .line{
        width: 100%;
        display: flex;
        font-size: 14px;
        line-height: 200%;
    }
    .container1 .itemBox .line div:nth-child(1){
        width: 20%;
        text-align: left
    }
    .container1 .itemBox .line div:nth-child(2){
        width: 80%;
        text-align: left;
        color: #888888;
    }
    .container1{
         width: 100%;
        display: flex;
        margin-bottom: 20px;
        box-sizing: border-box;
        flex-wrap: wrap;
        .attachmentitem{
            width: 16.5%;
            text-align: center;
            margin-bottom: 20px;
            div{
                font-size: 14px;
                padding: 20px;
                box-sizing:border-box;
                &:nth-child(1){
                    margin-bottom: 5px;
                }
                img{
                    width:100%;
                    height: 200px;
                }
            }
        }
       
    }
   .red{
       color: red;
   }
    .container2{
        width: 100%;
        margin-bottom: 20px;
        box-sizing: border-box;
         .radio{
            font-size: 14px;
            display: flex;
            justify-content: left;
            align-items: center;
            .margin{
                margin-right: 15px;
            }
        }
        .note{
            width: 30%;
            display: flex;
            margin-top: 20px;
            box-sizing: border-box;
            span{
                width: 15%;
            }
        }
        .btnBox{
            margin-top: 20px;
            margin-left: 4%;
        }
    }
    .el-checkbox.is-bordered+.el-checkbox.is-bordered{
        margin-left: 0;
        margin-top: 10px;
    }
  
    
   
</style>
